// 常量路由：全部用户都可以访问到的路由
export const constantRoute = [
  {
    // 登录
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    name: 'login', // 命名路由
    meta: {
      title: '登录', // 菜单标题
      hidden: true, // 代表路由标题在菜单中是否隐藏 true:隐藏 false:不隐藏
    },
  },
  {
    // 登录成功以后展示数据的路由
    path: '/',
    component: () => import('@/layout/index.vue'),
    name: 'layout',
    meta: {
      title: '', // 菜单标题
      icon: '',
    },
    redirect: '/home',
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页', // 菜单标题
          icon: 'HomeFilled',
        },
      },
    ],
  },
  {
    // 404
    path: '/404',
    component: () => import('@/views/404/index.vue'),
    name: '404',
    meta: {
      title: '404', // 菜单标题
      hidden: true,
    },
  },
  {
    path: '/acl',
    component: () => import('@/layout/index.vue'),
    name: 'Acl',
    meta: {
      title: '权限管理',
      icon: 'Lock',
    },
    redirect: '/acl/user',
    children: [
      {
        path: '/acl/user',
        component: () => import('@/views/acl/user/index.vue'),
        name: 'Acl',
        meta: {
          title: '用户管理',
          icon: 'User',
        },
      },
      {
        path: '/acl/role',
        component: () => import('@/views/acl/role/index.vue'),
        name: 'Role',
        meta: {
          title: '角色管理',
          icon: 'UserFilled',
        },
      },
      {
        path: '/acl/permission',
        component: () => import('@/views/acl/permission/index.vue'),
        name: 'Permission',
        meta: {
          title: '菜单管理',
          icon: 'Monitor',
        },
      },
    ],
  },
  {
    path: '/student',
    component: () => import('@/layout/index.vue'),
    name: 'Student',
    meta: {
      title: '学生管理',
      icon: 'Student',
    },
    redirect: '/student/info',
    children: [
      {
        path: '/student/info',
        component: () => import('@/views/student/StuInfo.vue'),
        name: 'StudentInfo',
        meta: {
          title: '学生信息',
          icon: 'ShoppingCartFull',
        },
      },
      {
        path: '/student/growthRecord',
        component: () => import('@/views/student/GrowthRecord.vue'),
        name: 'GrowthRecord',
        meta: {
          title: '成长记录',
          icon: 'Calendar',
        },
      },
      {
        path: '/student/familyInfo',
        component: () => import('@/views/student/FamilyInfo.vue'),
        name: 'FamilyInfo',
        meta: {
          title: '家庭信息',
          icon: 'Calendar',
        },
      },
    ],
  },
  {
    path: '/teacher',
    component: () => import('@/layout/index.vue'),
    name: 'Teacher',
    meta: {
      title: '教师管理',
      icon: 'Student',
    },
    redirect: '/teacher/info',
    children: [
      {
        path: '/teacher/info',
        component: () => import('@/views/teacher/TeacherInfo.vue'),
        name: 'TeacherInfo',
        meta: {
          title: '教师信息',
          icon: 'ShoppingCartFull',
        },
      },
      // {
      //   path: '/student/dailyAtte',
      //   component: () => import('@/views/student/DailyAtte.vue'),
      //   name: 'DailyAtte',
      //   meta: {
      //     title: '日常考勤',
      //     icon: 'ChromeFilled',
      //   },
      // },
      // {
      //   path: '/student/growthRecord',
      //   component: () => import('@/views/student/GrowthRecord.vue'),
      //   name: 'GrowthRecord',
      //   meta: {
      //     title: '成长记录',
      //     icon: 'Calendar',
      //   },
      // },
      // {
      //   path: '/student/familyInfo',
      //   component: () => import('@/views/student/FamilyInfo.vue'),
      //   name: 'FamilyInfo',
      //   meta: {
      //     title: '家庭信息',
      //     icon: 'Calendar',
      //   },
      // },
    ],
  },
  {
    path: '/enroll',
    component: () => import('@/layout/index.vue'),
    name: 'Enroll',
    meta: {
      title: '报名管理',
      icon: 'Student',
    },
    redirect: '/enroll/info',
    children: [
      {
        path: '/enroll/info',
        component: () => import('@/views/enroll/EnrollPage.vue'),
        name: 'EnrollInfo',
        meta: {
          title: '报名信息',
          icon: 'ShoppingCartFull',
        },
      }
    ],
  },{
        path: '/notice',
        component: () => import('@/layout/index.vue'),
        name: 'Notice',
        meta: {
          title: '通知管理',
          icon: 'Student',
        },
        redirect: '/notice/info',
        children: [
          {
            path: '/notice/info',
            component: () => import('@/views/notice/NoticePage.vue'),
            name: 'NoticeInfo',
            meta: {
              title: '通知信息',
              icon: 'ShoppingCartFull',
            },
          }
        ],
      },
    {
      path: '/dishes',
      component: () => import('@/layout/index.vue'),
      name: 'dishesInfo',
      meta: {
        title: '菜品管理',
        icon: 'Student',
      },
      redirect: '/dishesInfo/info',
      children: [
        {
          path: '/dishesInfo/info',
          component: () => import('@/views/dishes/dishesInfo.vue'),
          name: 'recipe',
          meta: {
            title: '菜品信息',
            icon: 'ShoppingCartFull',
          },
        },
        {
          path: '/recipe/info',
          component: () => import('@/views/dishes/recipe.vue'),
          name: 'DailyAtte',
          meta: {
            title: '食谱信息',
            icon: 'ChromeFilled',
          },
        },
      ],
    }

]

// 异步路由
export const asyncRoute = [
  // {
  //   path: '/acl',
  //   component: () => import('@/layout/index.vue'),
  //   name: 'Acl',
  //   meta: {
  //     title: '权限管理',
  //     icon: 'Lock',
  //   },
  //   redirect: '/acl/user',
  //   children: [
  //     {
  //       path: '/acl/user',
  //       component: () => import('@/views/acl/user/index.vue'),
  //       name: 'Acl',
  //       meta: {
  //         title: '用户管理',
  //         icon: 'User',
  //       },
  //     },
  //     {
  //       path: '/acl/role',
  //       component: () => import('@/views/acl/role/index.vue'),
  //       name: 'Role',
  //       meta: {
  //         title: '角色管理',
  //         icon: 'UserFilled',
  //       },
  //     },
  //     {
  //       path: '/acl/permission',
  //       component: () => import('@/views/acl/permission/index.vue'),
  //       name: 'Permission',
  //       meta: {
  //         title: '菜单管理',
  //         icon: 'Monitor',
  //       },
  //     },
  //   ],
  // },
  // {
  //   path: '/student',
  //   component: () => import('@/layout/index.vue'),
  //   name: 'Student',
  //   meta: {
  //     title: '学生管理',
  //     icon: 'Student',
  //   },
  //   redirect: '/student/info',
  //   children: [
  //     {
  //       path: '/student/info',
  //       component: () => import('@/views/student/StuInfo.vue'),
  //       name: 'StudentInfo',
  //       meta: {
  //         title: '学生信息',
  //         icon: 'ShoppingCartFull',
  //       },
  //     },
  //     {
  //       path: '/student/dailyAtte',
  //       component: () => import('@/views/student/DailyAtte.vue'),
  //       name: 'DailyAtte',
  //       meta: {
  //         title: '日常考勤',
  //         icon: 'ChromeFilled',
  //       },
  //     },
  //     {
  //       path: '/student/growthRecord',
  //       component: () => import('@/views/student/GrowthRecord.vue'),
  //       name: 'GrowthRecord',
  //       meta: {
  //         title: '成长记录',
  //         icon: 'Calendar',
  //       },
  //     },
  //   ],
  // },
]

// 任意路由
export const anyRoute = {
  path: '/:pathMatch(.*)*',
  redirect: '/404',
  name: 'Any',
  meta: {
    title: '任意', // 菜单标题
    hidden: true,
    icon: 'DataLine',
  },
}
